home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / rayfiles / rsdefs / docs / addingguide next >
Text File  |  1994-08-09  |  2KB  |  36 lines

  1. Adding Guidelines
  2. =================
  3.  
  4.     This file is to help define what the goals of this package are as far
  5. as adding new creations is concerned.
  6.  
  7.     1) All creations (objects, textures, surfaces) are defined so as to
  8. not add to the memory requirements for a scene that does not specifically ask
  9. for something pertaining to that creation.  Thus the creations only take up
  10. memory in the C-preprocessor.  The current way of doing this is to "#define"
  11. everything and only when there is a call to a specific creation will actual
  12. rayshade "code" be produced.  An easy way to test this is to type in
  13. "echo '#include "defs.rh"' | cpp -l<path to rsdefs dir> -P | sort -u"
  14. and the only thing that should come out is blank lines.
  15.  
  16.     2) All creations that are "logically" able to be implemented by
  17. name or as an instance are defined such that they can be used in either manner.
  18. Right now, the only things in rayshade that can be implemented in such a manner
  19. are surfaces and objects.  All creations that can be implemented as instances
  20. or by name should have a "prefix" argument as the first argument that allows a
  21. user to add the appropriate code for naming the creation.  This means that for
  22. surfaces, the "prefix" will expect "surface some_name" or null.  For objects,
  23. the "prefix" will expect "name some_obj_name" or null.  If the parameter is
  24. left blank, then an instance of the creation will be created.
  25.  
  26.     3) All objects can be implemented inside aggregates.
  27.  
  28.     4) All objects can be followed by transformation calls that will
  29. transform the object in a logical manner.  For example if "RSPtoothbrush(,s1)"
  30. will produce an instance of a toothbrush, then "RSPtoothbrush(,s1)
  31. translate 2 3 4" will translate the whole toothbrush (as opposed to some
  32. _part_ of the toothbrush).
  33.  
  34.     5) Names are as simple and logical as possible.
  35.  
  36.